#include <iostream>
struct a{
    int i;
    double d;
    operator bool()const{return i;}
};
struct ct{
    int i=42;
    void *clear(ct*);
};
struct cvoid{
    int i=42;
    void *clear;
};
    void clr(ct*c){
        c->i=0;
    }
class B{
    int i;
    public:
    void show()const{std::cout<<i<<std::endl;}
    operator bool()const{return i;}
};
template<typename T>
void test(T const& t){
    if(t)
        t.show();
}
int main(){
    ct c0;
    c0.clear=clr;
    std::cout<<c0.i<<std::endl;
    c0.clear(&c0);
    std::cout<<c0.i<<std::endl;
    a a1{1,0.3};
    {
        a a2{42,4.2};
    }
    //test(B());
    //test(a1);
    return 0;
}
